  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_grid_top_table" >
    <tr>
      <td>
        <div class="metallic_grid_title">Link to existing image</div>
      </td>
    </tr>
    <tr>
        <td class="metallic_paginator">
            <form action="admin/modules/tangra_cms/ci/ci_image_select.php" method="get">
            <table border="0" cellspacing="0" cellpadding="4">
                <tr>
                    <td valign="middle"><strong>Filter</strong>&nbsp;&nbsp;&nbsp;
                    </td>
                    <td>
                        <table border="0" cellspacing="0" cellpadding="4" align="left">
                            <tr>
                                <td>File name like:</td>
                                <td><input name="filename" type="text" size="45" maxlength="255" value="{$filename}"/>&nbsp;&nbsp;</td>
                            </tr>
                            <tr>
                                <td>Note or alt like:</td>
                                <td><input name="notealt" type="text" size="45" maxlength="255" value="{$notealt}"/>&nbsp;&nbsp;</td>                                    
                            </tr>
                        </table>                        
                    </td>
                    <td valign="middle"><input name="submit_filter" type="submit" value="filter" /></td>
                </tr>
            </table>
            <input type="hidden" name="ci" value="{$ci_id}" />
            </form>
        </td>
    </tr>        
    <tr>
      <td>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_paginator">
          <tr>
            <td width="34%"> {if $ci_image_select_total_pages > 1}
              <table border="0" cellspacing="0" cellpadding="2" class="metallic_pg_page_of_table">
                <tr>
                  <td valign="middle">{if $ci_image_select_first_page}<a href="{$ci_image_select_first_page}" onclick="submit_ajax_grid_ci_image_select({$ci_image_select_first_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first_blue.png" alt="First page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first.png" alt="First page" border="0" />{/if}</td>
                  <td valign="middle">{if $ci_image_select_prev_page}<a href="{$ci_image_select_prev_page}" onclick="submit_ajax_grid_ci_image_select({$ci_image_select_prev_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev_blue.png" alt="Previous page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev.png" alt="Previous page" border="0" />{/if}</td>
                  <td class="metallic_pg_page_of" valign="middle">{if $ci_image_select_total_pages}Page {$ci_image_select_current_page} of {$ci_image_select_total_pages}{/if}</td>
                  <td valign="middle">{if $ci_image_select_next_page}<a href="{$ci_image_select_next_page}" onclick="submit_ajax_grid_ci_image_select({$ci_image_select_next_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next_blue.png" alt="Next page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next.png" alt="Next page" border="0" />{/if}</td>
                  <td valign="middle">{if $ci_image_select_last_page}<a href="{$ci_image_select_last_page}" onclick="submit_ajax_grid_ci_image_select({$ci_image_select_last_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last_blue.png" alt="Last page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last.png" alt="Last page" border="0" />{/if}</td>
                </tr>
              </table>
              {/if} </td>
            <td class="metallic_pg_jump_to_page" width="33%" align="center">{if $ci_image_select_records_to} Records {$ci_image_select_records_from}-{$ci_image_select_records_to} of {$ci_image_select_records_total}{/if}</td>
            <td class="metallic_pg_records" width="33%" align="right"> {if $ci_image_select_total_pages > 1}
              <table border="0" cellspacing="2" cellpadding="0">
                <tr>
                  <td>Jump to page</td>
                  <td>
                    <form class="metallic_pg_page_select" action="{$ci_image_select_prows_jump_to_page_action}" method="get" enctype="application/x-www-form-urlencoded">
                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td>
                            <select name="ci_image_select_grid_page" id="ci_image_select_field_page" onchange="ci_image_select_page_change(this.options[this.selectedIndex].value); return false;">
                              
															{foreach from=$ci_image_select_jump_to_page_arr item=ci_image_select_page_num}
															
                              <option value="{$ci_image_select_page_num}"{if $ci_image_select_page_num == $ci_image_select_current_page} selected="selected"{/if}>{$ci_image_select_page_num}</option>
                              
															{/foreach}
														
                            </select>
                            <input type="hidden" name="ci" value="{$ci_id}" />                            
                          </td>
                          <td>
                            <noscript>
                            &nbsp;
                            <input name="submit" type="image" src="img/modules/grid_html_tpl_static_ajax_metallic/page_go.png" alt="go" />
                            </noscript>
                          </td>
                        </tr>
                      </table>
                    </form>
                  </td>
                </tr>
              </table>
              {else}
              &nbsp;
              {/if} </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td>
        <table width="100%"  border="0" cellspacing="1" cellpadding="2" class="metallic_grid_table">
          <tbody>
        {section name=images loop=$ci_image_select_prows step=3}
        <tr class="metallic_grid_body">
          <td align="left" width="280"{if $ci_image_select_prows[$smarty.section.images.index].cols.8} class="status_selected"{/if}>
            <table border="0" cellpadding="4" cellspacing="0">
              <tr>
                <td>
                  <table width="100%" border="0">
                    <tr>
                      <td align="left" width="{$t1_width}"><a href="admin/modules/tangra_cms/get_img_admin.php?imgid={$ci_image_select_prows[$smarty.section.images.index].cols.0}" target="_blank"><img src="admin/modules/tangra_cms/get_img_admin.php?imgid={$ci_image_select_prows[$smarty.section.images.index].cols.0}&amp;imgvar=t1" border="0" /></a> </td>
                      <td align="left" valign="top">
                        <table width="100%" border="0">
                          <tr>
                            <td align="left"><strong>File name</strong>:<br />
                              {$ci_image_select_prows[$smarty.section.images.index].cols.1}</td>
                          </tr>
                          <tr>
                            <td><strong>ID</strong>: {$ci_image_select_prows[$smarty.section.images.index].cols.0}</td>
                          </tr>
                          <tr>
                            <td align="left"><strong>Size</strong>: {$ci_image_select_prows[$smarty.section.images.index].cols.2/1024|string_format:"%.2f"} KiB</td>
                          </tr>
                          <tr>
                            <td align="left">{$ci_image_select_prows[$smarty.section.images.index].cols.3} x {$ci_image_select_prows[$smarty.section.images.index].cols.4} px</td>
                          </tr>
                          <tr>
                            <td align="left">
                                <table width="100%" border="0">
                                  <tr>
                                    <td width="16">
										{if $ci_image_select_prows[$smarty.section.images.index].cols.8}                                
                                        <a href="admin/modules/tangra_cms/ci/ci_image_select.php?ci={$ci_id}&amp;deselect={$ci_image_select_prows[$smarty.section.images.index].cols.8}" class="action_cancel">Deselect</a>
                                        {else}
                                    	<a href="admin/modules/tangra_cms/ci/ci_image_select.php?ci={$ci_id}&amp;select={$ci_image_select_prows[$smarty.section.images.index].cols.0}" class="action_select">Select</a>                                        
										{/if}                                         
                                    </td>
                                    <td>&nbsp;</td>                                    
                                  </tr>
                                </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td><strong>Alt</strong>: {if $ci_image_select_prows[$smarty.section.images.index].cols.7}<span {popup text="<strong>Alt full text</strong>:<br>`$ci_image_select_prows[$smarty.section.images.index].cols.7`"}>{$ci_image_select_prows[$smarty.section.images.index].cols.7|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
              <tr>
                <td><strong>Note</strong>: {if $ci_image_select_prows[$smarty.section.images.index].cols.6}<span {popup text="<strong>Note full text</strong>:<br>`$ci_image_select_prows[$smarty.section.images.index].cols.6`"}>{$ci_image_select_prows[$smarty.section.images.index].cols.6|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
            </table>
          </td>
            {math equation="next + 1" next=$smarty.section.images.index assign=index_next_next}                                  
          <td align="left" width="280"{if $ci_image_select_prows[$index_next_next].cols.8} class="status_selected"{/if}>
            {if $ci_image_select_prows[$index_next_next].cols.0}            
            <table border="0" cellpadding="4" cellspacing="0">
              <tr>
                <td>
                  <table width="100%" border="0">
                    <tr>
                      <td align="left" width="{$t1_width}"><a href="admin/modules/tangra_cms/get_img_admin.php?imgid={$ci_image_select_prows[$index_next_next].cols.0}" target="_blank"><img src="admin/modules/tangra_cms/get_img_admin.php?imgid={$ci_image_select_prows[$index_next_next].cols.0}&amp;imgvar=t1" border="0" /></a> </td>
                      <td align="left" valign="top">
                        <table width="100%" border="0">
                          <tr>
                            <td align="left"><strong>File name</strong>:<br />
                              {$ci_image_select_prows[$index_next_next].cols.1}</td>
                          </tr>
                          <tr>
                            <td><strong>ID</strong>: {$ci_image_select_prows[$index_next_next].cols.0}</td>
                          </tr>
                          <tr>
                            <td align="left"><strong>Size</strong>: {$ci_image_select_prows[$index_next_next].cols.2/1024|string_format:"%.2f"} KiB</td>
                          </tr>
                          <tr>
                            <td align="left">{$ci_image_select_prows[$index_next_next].cols.3} x {$ci_image_select_prows[$index_next_next].cols.4} px</td>
                          </tr>
                          <tr>
                            <td align="left">
                                <table width="100%" border="0">
                                  <tr>
                                    <td width="16">
										{if $ci_image_select_prows[$index_next_next].cols.8}                                
                                        <a href="admin/modules/tangra_cms/ci/ci_image_select.php?ci={$ci_id}&amp;deselect={$ci_image_select_prows[$index_next_next].cols.8}" class="action_cancel">Deselect</a>
                                        {else}
                                    	<a href="admin/modules/tangra_cms/ci/ci_image_select.php?ci={$ci_id}&amp;select={$ci_image_select_prows[$index_next_next].cols.0}" class="action_select">Select</a>                                        
										{/if}                                         
                                    </td>
                                    <td>&nbsp;</td>                                    
                                  </tr>
                                </table>
                            </td>
                          </tr>

                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td><strong>Alt</strong>: {if $ci_image_select_prows[$index_next_next].cols.7}<span {popup text="<strong>Alt full text</strong>:<br>`$ci_image_select_prows[$index_next_next].cols.7`"}>{$ci_image_select_prows[$index_next_next].cols.7|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
              <tr>
                <td><strong>Note</strong>: {if $ci_image_select_prows[$index_next_next].cols.6}<span {popup text="<strong>Note full text</strong>:<br>`$ci_image_select_prows[$index_next_next].cols.6`"}>{$ci_image_select_prows[$index_next_next].cols.6|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
            </table>
          {else}
          &nbsp;
          {/if}
          </td>
	       {math equation="next + 2" next=$smarty.section.images.index assign=index_next_next}                    
          <td align="left" width="280"{if $ci_image_select_prows[$index_next_next].cols.8} class="status_selected"{/if}>
            {if $ci_image_select_prows[$index_next_next].cols.0}                       
            <table border="0" cellpadding="4" cellspacing="0">
              <tr>
                <td>
                  <table width="100%" border="0">
                    <tr>
                      <td align="left" width="{$t1_width}"><a href="admin/modules/tangra_cms/get_img_admin.php?imgid={$ci_image_select_prows[$index_next_next].cols.0}" target="_blank"><img src="admin/modules/tangra_cms/get_img_admin.php?imgid={$ci_image_select_prows[$index_next_next].cols.0}&amp;imgvar=t1" border="0" /></a> </td>
                      <td align="left" valign="top">
                        <table width="100%" border="0">
                          <tr>
                            <td align="left"><strong>File name</strong>:<br />
                              {$ci_image_select_prows[$index_next_next].cols.1}</td>
                          </tr>
                          <tr>
                            <td><strong>ID</strong>: {$ci_image_select_prows[$index_next_next].cols.0}</td>
                          </tr>
                          <tr>
                            <td align="left"><strong>Size</strong>: {$ci_image_select_prows[$index_next_next].cols.2/1024|string_format:"%.2f"} KiB</td>
                          </tr>
                          <tr>
                            <td align="left">{$ci_image_select_prows[$index_next_next].cols.3} x {$ci_image_select_prows[$index_next_next].cols.4} px</td>
                          </tr>
                          <tr>
                            <td align="left">
                                <table width="100%" border="0">
                                  <tr>
                                    <td width="16">
										{if $ci_image_select_prows[$index_next_next].cols.8}                                
                                        <a href="admin/modules/tangra_cms/ci/ci_image_select.php?ci={$ci_id}&amp;deselect={$ci_image_select_prows[$index_next_next].cols.8}" class="action_cancel">Deselect</a>
                                        {else}
                                    	<a href="admin/modules/tangra_cms/ci/ci_image_select.php?ci={$ci_id}&amp;select={$ci_image_select_prows[$index_next_next].cols.0}" class="action_select">Select</a>                                        
										{/if}                                         
                                    </td>
                                    <td>&nbsp;</td>
                                  </tr>
                                </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td><strong>Alt</strong>: {if $ci_image_select_prows[$index_next_next].cols.7}<span {popup text="<strong>Alt full text</strong>:<br>`$ci_image_select_prows[$index_next_next].cols.7`"}>{$ci_image_select_prows[$index_next_next].cols.7|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
              <tr>
                <td><strong>Note</strong>: {if $ci_image_select_prows[$index_next_next].cols.6}<span {popup text="<strong>Note full text</strong>:<br>`$ci_image_select_prows[$index_next_next].cols.6`"}>{$ci_image_select_prows[$index_next_next].cols.6|truncate:60:"...":true}</span>{else}<span class="no_value">None</span>{/if}</td>
              </tr>
            </table>
          {else}
          &nbsp;
          {/if}
          </td>
        </tr>
        {sectionelse}
        <tr>
        	<td class="metallic_grid_body">No images</td>
        </tr>
        {/section}          

          </tbody>
          
        </table>
      </td>
    </tr>
    <tr>
      <td>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_paginator">
          <tr>
            <td width="34%"> {if $ci_image_select_total_pages > 1}
              <table border="0" cellspacing="0" cellpadding="2" class="metallic_pg_page_of_table">
                <tr>
                  <td valign="middle">{if $ci_image_select_first_page}<a href="{$ci_image_select_first_page}" onclick="submit_ajax_grid_ci_image_select({$ci_image_select_first_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first_blue.png" alt="First page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first.png" alt="First page" border="0" />{/if}</td>
                  <td valign="middle">{if $ci_image_select_prev_page}<a href="{$ci_image_select_prev_page}" onclick="submit_ajax_grid_ci_image_select({$ci_image_select_prev_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev_blue.png" alt="Previous page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev.png" alt="Previous page" border="0" />{/if}</td>
                  <td class="metallic_pg_page_of" valign="middle">{if $ci_image_select_total_pages}Page {$ci_image_select_current_page} of {$ci_image_select_total_pages}{/if}</td>
                  <td valign="middle">{if $ci_image_select_next_page}<a href="{$ci_image_select_next_page}" onclick="submit_ajax_grid_ci_image_select({$ci_image_select_next_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next_blue.png" alt="Next page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next.png" alt="Next page" border="0" />{/if}</td>
                  <td valign="middle">{if $ci_image_select_last_page}<a href="{$ci_image_select_last_page}" onclick="submit_ajax_grid_ci_image_select({$ci_image_select_last_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last_blue.png" alt="Last page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last.png" alt="Last page" border="0" />{/if}</td>
                </tr>
              </table>
              {/if} </td>
            <td class="metallic_pg_jump_to_page" width="33%" align="center">{if $ci_image_select_records_to} Records {$ci_image_select_records_from}-{$ci_image_select_records_to} of {$ci_image_select_records_total}{/if}</td>
            <td class="metallic_pg_records" width="33%" align="right"> {if $ci_image_select_total_pages > 1}
              <table border="0" cellspacing="2" cellpadding="0">
                <tr>
                  <td>Jump to page</td>
                  <td>
                    <form action="{$ci_image_select_prows_jump_to_page_action}" method="get" enctype="application/x-www-form-urlencoded">
                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td>
                            <select name="ci_image_select_grid_page" id="ci_image_select_field_page" onchange="ci_image_select_page_change(this.options[this.selectedIndex].value); return false;">
                              
															{foreach from=$ci_image_select_jump_to_page_arr item=ci_image_select_page_num}
															
                              <option value="{$ci_image_select_page_num}"{if $ci_image_select_page_num == $ci_image_select_current_page} selected="selected"{/if}>{$ci_image_select_page_num}</option>
                              
															{/foreach}
														
                            </select>
                            <input type="hidden" name="ci" value="{$ci_id}" />                            
                          </td>
                          <td>
                            <noscript>
                            &nbsp;
                            <input name="submit" type="image" src="img/modules/grid_html_tpl_static_ajax_metallic/page_go.png" alt="go" />
                            </noscript>
                          </td>
                        </tr>
                      </table>
                    </form>
                  </td>
                </tr>
              </table>
              {else}
              &nbsp;
              {/if} </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
